import javax.print.attribute.standard.DateTimeAtCompleted;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-05-08
 * Time: 10:13
 */
//类和对象代码应用
class Dog{
    public String name;
    public int age;
    public String color;

    public void wag(){
        System.out.println(name+" 摇尾巴");
    }
    public void bark(){
        System.out.println((name+" 汪汪"));
    }
    public void show(){
        System.out.println("姓名: "+name);
        System.out.println("年龄: "+age);
        System.out.println("颜色: "+color);
    }
}
class Student{
    public String name;
    public String gender;
    public int age;
    public int score;

    public void doClass(){
        System.out.println("去上学");
    }
    public void doHomeWork(){
        System.out.println("做作业");
    }
    public void exam(){
        System.out.println("考试");
    }
}
public class Test {
    /*
    类和对象
     */
    public static void main(String[] args) {
        Data data = new Data();
        data.print();
        Dog dog = new Dog();
        dog.name = "大黄";
        dog.age = 2;
        dog.color = "黄色";
        dog.wag();
        dog.bark();
        dog.show();
        System.out.println("===========================");

        Dog dog2 = new Dog();
        dog2.name = "小黑";
        dog2.age = 12;
        dog2.color = "黑色";
        dog2.show();
    }
}
